package com.wanmait.houlang.util;

public class SysContext {
    //线程本地变量 对每个线程都有自己的一个副本
    private static ThreadLocal<Integer> pageNumLocal = new ThreadLocal<>();
    //private static ThreadLocal<Integer> pageSizeLocal = new ThreadLocal<>();
    //private static ThreadLocal<HttpServletRequest> requestLocal = new ThreadLocal<>();

    public static void setPageNum(Integer pageNum){
        pageNumLocal.set(pageNum);
    }
    public static Integer getPageNum(){
        return pageNumLocal.get();
    }

  /*  public static void setRequest(HttpServletRequest request){
        requestLocal.set(request);
    }
    public static HttpServletRequest getRequest(){
        return requestLocal.get();
    }*/
    public static void clear(){
        pageNumLocal.remove();
        //requestLocal.remove();
    }



}
